package com.qj.daibei.controller;

import com.qj.daibei.pojo.IdCardType;
import com.qj.daibei.service.IdCardTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.List;

/**
 * author wml
 * Created on 2021/9/29 17:15
 */
@Controller
public class IdCardTypeController {

    @Autowired
    private IdCardTypeService idCardTypeService;

    /**
     * 查询所有的身份证类型
     * @Author wml
     * @return 返回一个 JSON 格式的身份证类型集合
     */
    @GetMapping("/ajaxGetIdCardType")
    public ResponseEntity<List<IdCardType>> ajaxGetIdCardType() {
        List<IdCardType> idCardTypeList = this.idCardTypeService.queryAllIdCardType();
        return new ResponseEntity<List<IdCardType>>(idCardTypeList, HttpStatus.OK);
    }
}
